package com.ytd.smartcanteen.weighting.dialog;

import android.view.View;
import android.widget.PopupWindow;

import com.ytd.smartcanteen.weighting.MainActivity;

/**
 * Your class notes
 *
 * @author gaoguanchao
 * @since 2023/7/17 0017
 */
public class BaseDialog extends PopupWindow {
    MainActivity context;

    public BaseDialog(MainActivity context) {
        super(context);
        this.context = context;
        setOnDismissListener(context::settingDismiss);
    }

    @Override
    public void showAtLocation(View parent, int gravity, int x, int y) {
        context.settingShow();
        super.showAtLocation(parent, gravity, x, y);
    }
}
